<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.prime.com.tr/ui">

<h:head>
	<title>GARAGEM - <ui:insert name="titulo" />Acesso ao sistema</title>
	<link rel="stylesheet" type="text/css" href="#{facesContext.externalContext.requestContextPath}/css/estilo.css" />
</h:head>
<h:body>

	<div id="resolucao">
	
		<div id="info-topo" class="ui-accordion-header ui-helper-reset ui-state-default ui-state-active">
			<p align="right">
				<br />
			</p>
		</div>
		<div id="logo-topo">
			<table width="100%" cellspacing="5">
				<tr>
					<td>
						<p align="left" class="titulo">
							SISTEMA DE CONTROLE DE GARAGEM
						</p>
		            </td>
		            <td>
						<p align="right">
							<h:graphicImage value="/img/LogoInterface.jpg" />
						</p>
		            </td>
				</tr>
			</table>
			
		</div>
	
		<div id="corpo">
		
		<div id="conteudo">
		
		<p:ajaxStatus style="width:16px;height:16px;">
			<f:facet name="start">
				<h:graphicImage value="/img/ajaxloading.gif" />
			</f:facet>
	
			<f:facet name="complete">
				<h:outputText value="" />
			</f:facet>
		</p:ajaxStatus>
		
		<p:growl id="msgSistema" infoIcon="/img/accept.png" showDetail="false" life="6000" />
		
			<h:form id="loginForm">
			
				<script type="text/javascript">
	
					jQuery(function(){
						jQuery('input[id*="usuario"]').focus();
					});
					
				</script>
		
				<div class="login">
				
				<p:panel id="panelItemMenu">
				
					<h1 class="ui-panel-titlebar ui-widget-header ui-corner-all">Acesso ao sistema</h1>
				
					<table cellspacing="10">
						<tr>
							<td>
								<h:outputLabel for="usuario" value="* Usuário:" style="font-weight: bold;" />
								<br />
								<p:inputText id="usuario" value="#{loginBean.usuario.nmUsuario}"
									maxlength="20" style="width:200px;" />
				            </td>
						</tr>
						<tr>
				            <td>
								<h:outputLabel for="senha" value="* Senha:" style="font-weight: bold;" />
								<br />
								<p:password id="senha" value="#{loginBean.usuario.senha}" feedback="false"
		                        	maxlength="15" style="width:200px;" />
				            </td>
						</tr>
					</table>
				</p:panel>
				
				<br />
				<div align="right">
					<p:commandButton id="botaoSalvar" value="Entrar" update="msgSistema, loginForm" 
						action="#{loginBean.logar}" ajax="false" style="margin-left:5px;" />
					<p:commandButton id="botaoLimpar" value="Limpar" update="msgSistema, loginForm" ajax="false" 
						 action="#{loginBean.limparCampos}" style="margin-left:5px;" />
				</div>
				
				</div>
			
			</h:form>
		
		</div>
		</div>
	</div>
	<br />
</h:body>
</html>